<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
     <html>
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        	<title>城市天气查询</title>
        	<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
        	<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
        	<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
        </head>
        <body>
        <nav class="navbar navbar-default" role="navigation">
        	<div class="container-fluid">
        	<div class="navbar-header">
        		<a class="navbar-brand" href="#">旅游网站</a>
        	</div>
        	<div>
        		<ul class="nav navbar-nav">
        			<li><a href="searchAllProducts">旅游产品</a></li>
        			<li class="dropdown">
        				<a href="#" class="dropdown-toggle" data-toggle="dropdown">
        					用户区
        					<b class="caret"></b>
        				</a>
        				<ul class="dropdown-menu">
        					<li><a href="toAddC">用户发帖</a></li>
        					<li><a href="selectAllComment">用户帖子区</a></li>
        				</ul>
        			</li>
                    <li><a href="initS">天气查询</a></li>
        		</ul>
                <ul class="nav navbar-nav navbar-right">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">用户中心
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
        					<li><a href="touUpdate">修改用户信息</a></li>
        					<li><a href="selectMyCart">查看用户购物车</a></li>
                            <li><a href="selectMyOrderList">查看用户订单</a></li>
        				</ul>
                    </li>
                    <li><a href="touRegister"><span class="glyphicon glyphicon-user"></span> 注册</a></li>
                    <li><a href="touLogin"><span class="glyphicon glyphicon-log-in"></span> 登录</a></li>
                    <li><a href="ulogOut"><span class="glyphicon glyphicon-log-out"></span> 登出</a></li>
                </ul>
        	</div>
        	</div>
        </nav>
        <br>
        <h3>城市天气查询</h3>
        <br>
        <br>
        <form role="form" action="${pageContext.request.contextPath}/searchW" method="post">
        	<div class="form-group">
        		<div class="col-lg-2">
                <label for="name">城市名称：</label>
        		<input type="text" class="form-control" name="cityName"
        			   placeholder="请输入城市名称" required="required">
        	<br>
        	<button type="submit" class="btn btn-default">查询</button>
            <button type="reset" class="btn btn-default">重置</button>
        </div></div>
        </form>
        <br>
        <table class="table table-hover">
        	<thead>
        		<tr>
        			<th>城市</th>
                    <th>天气</th>
                    <th>温度</th>
                    <th>湿度</th>
                    <th>风向</th>
                    <th>风力</th>
                    <th>空气质量</th>
        		</tr>
        	</thead>
            <c:forEach items="${w}" var="ww">
        	<tbody>
                <tr>
                    <td>${ww.city}</td>
                    <td>${ww.info}</td>
                    <td>${ww.tem}</td>
                    <td>${ww.hum}</td>
                    <td>${ww.dir}</td>
                    <td>${ww.pow}</td>
                    <td>${ww.aqi}</td>
                    </tr>
        	</tbody>
        </c:forEach>
        </table>
        </body>
        </html>